package edu.nf.project.services.storeOperation;

import edu.nf.project.entitys.entity.storeOperation.convention.operate.RefundRequest;

import java.util.List;

/**
 * @author CSY
 * @date 2025 - 06 - 18
 */
public interface RefundRequestService {
    /**
     * 添加退款申请并获取到编号
     * @param refundRequest
     */
    Integer insertRefundRequest(RefundRequest refundRequest);

    /**
     * 根据账户编号获取退款申请
     * @param uId
     * @return
     */
    List<RefundRequest> listRefundRequestByUserId(Integer uId);

    /**
     * 根据主键编号查找退款申请
     * @param id
     * @return
     */
    RefundRequest getRefundRequestById(Integer id);

    /**
     * 取消申请 - 修改状态
     * @param rrId
     */
    void cancelRefundRequestById(Integer rrId);

    /**
     * 修改申请
     * @param refundRequest
     */
    void updateRefundRequest(RefundRequest refundRequest);

    /**
     * 退款处理 - 修改退款申请 + 钱返还用户
     * @param refundRequest
     * @param refundWay 退款方式
     */
    void processRefund(RefundRequest refundRequest,String refundWay);
}
